import pandas as pd
import plotly.graph_objs as go

x = ["f1", "f2", "f3", "f4", "f5"]
y1 = [5, 20, 36, 10, 75]
y2 = [10, 25, 8, 60, 20]

traceA = go.Bar(x=x,y=y1,name="模型A")
traceB = go.Bar(x=x,y=y2,name="模型B")
layout = go.Layout(title="特征重要性分析",xaxis={"title":"特征"},
    yaxis={"title":"重要性"},barmode="group") #barmode is one of "relative","overlay","group"

fig = go.Figure(data = [traceA,traceB],layout=layout)
fig.show()


